<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddBankCodeToAdminBankIcns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('admin_bank_icons', function (Blueprint $table) {
            $table->string('bank_code')->default('')->comment('银行编码');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if(Schema::hasTable('admin_bank_icons')){
            Schema::table('admin_bank_icons', function (Blueprint $table) {
                $table->dropColumn('bank_code');
            });
        }
    }
}
